package com.example.msai.controller;


import com.example.msai.entity.DeepSeekRe;
import com.example.msai.service.DeepSeekService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RestController
public class DeepSeekController {
    @Autowired
    private DeepSeekService deepSeekService;
    @PostMapping("/DeepSeek")
    public String getAiResponse(@RequestBody DeepSeekRe deepSeekRe) throws IOException, IOException {
        String q = deepSeekRe.getq();
        return deepSeekService.getAiResponse(q);
    }
}
